package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestCertifiedStatus;
import com.estar.assistsurvy.entity.ResponseCertifiedStatus;

import android.content.Context;
import android.os.Handler;
import android.util.Log;

public class CertifiedStatusThread extends BaseThread {
	private RequestCertifiedStatus certifiedStatus;

	public CertifiedStatusThread(Context context,RequestCertifiedStatus certifiedStatus, Handler handler) {
		super(context, handler);
		this.certifiedStatus = certifiedStatus;
	}


	@Override
	public void run() {
		url_str=Constants.NAMESPACE+Constants.CERTIFIEDSTATUS;
		json=gson.toJson(certifiedStatus);
		postRequest(url_str, json);
		if(result!=null){
			ResponseCertifiedStatus certified=new ResponseCertifiedStatus();
			certified=gson.fromJson(result, ResponseCertifiedStatus.class);
			
			msg.what=0;
			msg.obj=certified;
			Log.i("wl", "资质认证网络请求返回值"+result);
			msg.sendToTarget();
		}
	}
}
